package edu.nf.supermarket.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author yjj
 * @date 2025-06-10
 * 商品评价类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Comments {
    /**
     * 评论Id
     */
    private Integer commentId;
    /**
     * 商品Id
     */
    private Integer commodityId;
    /**
     * 用户Id
     */
    private Integer userId;
    /**
     * 品论内容
     */
    private String content;
    /**
     * 评分(1-5)
     */
    private Byte grade;
    /**
     * 评论时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime commentTime;
    /**
     * 是否匿名(0-否,1-是)
     */
    private Byte isAnonymous;
    /**
     * 删除状态(0-正常,1-删除)
     */
    private Byte deleteStatus;
    /**
     * 评论图片
     */
    private List<CommentImage> commentImages;
    /**
     * 评论用户信息
     */
    private User user;
}
